const {Sequelize} = require('sequelize');
const {sequelize} = require('./common/dbconnection')


const Room = sequelize.define('room', {
        roomId: {
            type: Sequelize.INTEGER,
            primaryKey: true,
            autoIncrement: true,
            comment: "自增id"
        },
        price: {
            type: Sequelize.STRING
        },
        type: {
            type: Sequelize.STRING
        },
        area: {
            type: Sequelize.STRING
        },
        total: {
            type: Sequelize.STRING
        },
        address: {
            type: Sequelize.STRING
        },
        roomDescribe: {
            type: Sequelize.STRING
        },
        categoryId: {
            type: Sequelize.INTEGER
        },
    },
    {
        tableName: "room",
        timestamps: false
    }
) //第三个参数来设定数据库表名 防止框架 加个s 如users ，设置时间错，否则在查询时候会添加updateAt 字段 也可以在查询时候指定attribute属性 就不会报错
module.exports= Room;